<template>
  <img :src="levelImg" alt="" class="level">
</template>

<script>
  export default {
    props: {
      cumulativeInvest: {
        type: Number,
        default: 0
      }
    },
    computed: {
      levelImg () {
        const money = this.cumulativeInvest
        if (money < 50000) {
          return require('./lv1@3x.png')
        }
        if (money < 500000) {
          return require('./lv2@3x.png')
        } else {
          return require('./lv3@3x.png')
        }
      }
    }
  }
</script>

<style lang='scss'>
  .level {
    width: 24px;
    height: 24px;
  }
</style>
